const createZip = require('./src/createZip');

let buildFlag = false;

function doBuild() {
    if (buildFlag) return false;
    buildFlag = true;
    setTimeout(() => {
      buildFlag = false;
    }, 1000)
    // Synchronous code
    createZip.doSync((error, srcPath) => {
      if (error) {
        console.log(error);
        return;
      }
      console.log("build success");
      createZip.doClear()
    }, true, 'build');
}

doBuild();

const readline = require('readline')

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
})
